package fr.vvins.core.biz.user.dto;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonSubTypes;
import org.codehaus.jackson.annotate.JsonSubTypes.Type;
import org.codehaus.jackson.annotate.JsonTypeInfo;

import fr.vvins.core.biz.auth.dto.FacebookCredentialDtoImpl;
import fr.vvins.core.biz.auth.dto.LocalCredentialDtoImpl;
import fr.vvins.core.common.dto.BeanDto;

@JsonIgnoreProperties(ignoreUnknown=true)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property="type")
@JsonSubTypes({ @Type(value = LocalCredentialDtoImpl.class, name = "local"),
				@Type(value = FacebookCredentialDtoImpl.class, name = "facebook"),
})
public interface CredentialDto extends BeanDto {
	
	public final static String TYPE_LOCAL = "local";

	public final static String TYPE_FACEBOOK = "facebook";
	
	public String getType();

}
